package com.lxujia.ruankao.ui;

import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.widget.LinearLayout;

import com.lxujia.ruankao.R;

/**
 * TODO: document your custom view class.
 */
public class AnswerDetailView extends LinearLayout {
    private int answerId = 0; // 当前选项 0 A，1 B，2 C，3 D

    public AnswerDetailView(Context context) {
        super(context);
        init(null, 0);
    }

    public AnswerDetailView(Context context, AttributeSet attrs) {
        super(context, attrs);
        init(attrs, 0);
    }


    public AnswerDetailView(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
        init(attrs, defStyle);
    }

    private void init(AttributeSet attrs, int defStyle) {
        final TypedArray a = getContext().obtainStyledAttributes(
                attrs, R.styleable.AnswerDetailView, defStyle, 0);

        answerId = 0;
        a.recycle();
    }

    public int getAnswerId() {
        return answerId;
    }

    public void setAnswerId(int answerId) {
        this.answerId = answerId;
    }
}
